function addClassify(){
    // mbox.newTab("新增商品分类","/console/addClassify",100);
    openNewWindow('console/classfiy/classifyNew',800,600);
}

function lookClassify(id){
    // mbox.newTab("新增商品分类","/console/addClassify",100);
    openNewWindow('console/lookClassify?id='+id,800,600);
}

function saveClassify() {
    _confirm("系统提示","确认保存分类数据？",{
        buttons:{"确定":true,"取消":false},
        callback:function (v) {
            if(v){
                var data = $("#saveForm").serialize();
                $.post(transferUrl('/console/saveClassfiy'),data,function (result) {
                    _confirm("系统提示",result.message,{callback:function(v){
                        if(result.result=="success"){
                            $("#searchBtn",window.opener.document).click();
                            window.close();
                        }
                        }
                    });
                });
            }
        }
    })
}
/**
 * 刪除分類
 * @param id
 */
function deleteClassify(id) {
    _confirm("操作提示","确认删除该条分类信息？",
    {
        buttons:{"删除":true,"取消":false},
        callback:function (v) {
            if(v)
            {
                $.post(transferUrl("/console/deleteClassify"),{"id":id},function (result) {
                    if(result.status=="500"){
                        _confirm("操作提示",result.message,{
                            callback:function (v) {
                                if(result.result=="success"){
                                    $("#searchBtn").click();
                                }
                            }
                        })
                    }
                })
            }
        }
    });
}